#include <iostream>
#include <string>
#include <cstring>
#include <stack>


using namespace std;

int main()
{
    int i=0;
    string text;
    stack<char> s;
    cout<<"Enter a string you want reverse of: ";
    cin>>text;
    for(int i=0;i<text.length();i++)
    {
        s.push(text[i]);
    }
    while(!s.empty())
    {
        cout<<s.top();
        s.pop();
    }
}